using System;
using UnityEngine;

[Serializable]
public class SerializableVector3
{
    public float x, y, z;

    public SerializableVector3(Vector3 vector3)
    {
        x = vector3.x;
        y = vector3.y;
        z = vector3.z;
    }

    public Vector3 ToVector3()
    {
        return new Vector3(x, y, z);
    }

    public Vector2Int ToVector2Int()
    {
        return new Vector2Int((int)x, (int)y);
    }
}
[Serializable]
public class SerializableVector2
{
    public float x, y;

    public SerializableVector2(Vector2 vector2 = default)
    {
        x = vector2.x;
        y = vector2.y;
    }

    public Vector2 ToVector2()
    {
        return new Vector2(x, y);
    }

    public Vector2Int ToVector2Int()
    {
        return new Vector2Int((int)x, (int)y);
    }
}